updateiconcache: Avoid confusing loop construct
authorDaniel Boles <dboles.src@gmail.com>
Wed, 4 Oct 2017 21:58:48 +0000 (22:58 +0100)
committerDaniel Boles <dboles.src@gmail.com>
Wed, 4 Oct 2017 21:59:11 +0000 (22:59 +0100)
commit88b15beb0a3c67544984099694619653545fba8a
treee281cc61067ab5e6c736aee03f5dd13910e4f72b
parente4754a007b70a9a69cdd468c6ad4b9e560d6fa83
updateiconcache: Avoid confusing loop construct

n_attach_points is the result of g_strv_length(): the index at which the
string vector ends in NULL. So by definition, when i == n_attach_points,
string[i] == NULL, and there is no need to check for the latter. The
fact that we did appears to confuse static analysers, as the dereference
and index check were inverted from what would normally be safe. We could
reverse them, but we may as well just remove the unnecessary NULL check.

https://bugzilla.gnome.org/show_bug.cgi?id=788458
gtk/updateiconcache.c